package com.weixing.mall.provider.api.service;

import com.weixing.mall.base.wrapper.Result;
import com.weixing.mall.provider.api.fallback.SysConfigServieFallback;
import com.weixing.mall.provider.api.model.vo.SysConfigVo;
import com.weixing.mall.provider.api.model.vo.SysUserEditVo;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.cloud.openfeign.ribbon.FeignRibbonClientAutoConfiguration;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * SysConfigServiceFeign
 *
 * @author  kfc
 * @date  2019/8/2 17:36
 * @since 1.0
 */
@FeignClient(value ="mall-provider-cms",configuration = FeignRibbonClientAutoConfiguration.class,fallback = SysConfigServieFallback.class)
public interface SysConfigServiceFeign {

    @GetMapping(value = "/api/cfg/getByCode")
     Result<SysConfigVo> getByCode(@RequestParam(value = "cfgCode") String cfgCode);

    @GetMapping(value = "/api/cfg/getUserById")
     Result<SysUserEditVo> getUserById(@RequestParam(value = "userId") Long userId);
}
